package com.chukun.disruptor.higher.chain;


import com.lmax.disruptor.EventHandler;

import java.util.UUID;

/**
 * handler1: 设置ID
 */
public class EventHandlerTaskOne  implements EventHandler<Trade> {

    @Override
    public void onEvent(Trade trade, long l, boolean b) throws Exception {
        trade.setTradeID(UUID.randomUUID().toString());
        System.out.println("set ID :"+trade.getTradeID());
        Thread.sleep(1000);
    }
}
